<?php 

	//引入类文件
	include './Model.class.php';
	include './Page.class.php';

	//创建模型
	$goods = new Model('goods');

	//获取总数
	$count = $goods->count();

	//分页
	$page = new Page($count,16);

	//获取limit
	$limit = $page->getLimit();

	//模型查询数据
	$result = $goods->limit($limit)->select();

	// var_dump($result);

	//返回给ajax json
	echo json_encode($result);





 ?>